﻿@using Microsoft.AspNetCore.Identity

@inject SignInManager<IdentityUser> SignInManager
@inject UserManager<IdentityUser> UserManager

        <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>@ViewData["Title"] - FinanceChecker</title>
        <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
        <link rel="stylesheet" href="~/FinanceChecker.styles.css" asp-append-version="true" />
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css">
        <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">

        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0/css/bootstrap.min.css">

        <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/fullcalendar@6.1.8/index.global.min.js"></script>
       
        <script>document.addEventListener('DOMContentLoaded', function () {
                var calendarEl = document.getElementById('calendar');
                var calendar = new FullCalendar.Calendar(calendarEl, {
                    initialView: 'dayGridMonth',
                    events: '/Bills/GetBillEvents'

                });
                calendar.render();
            });</script>
        <link href="https://cdn.datatables.net/1.11.5/css/jquery.dataTables.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="https://cdn.datatables.net/responsive/2.2.9/css/responsive.dataTables.min.css" />
        <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
        <style>
            body {
/*                background-image: url('/img/pexels-oleksandr-canary-islands-12969397.jpg');*/
                background-image: url('/img/background.png');
                background-size: cover;
                background-repeat: no-repeat;
                background-attachment: fixed;
            }
        </style>
    </head>
    <body>
        <header>
            <div class="navbar-container">
                <nav class="navbar navbar-expand-sm navbar-toggleable-sm custom-header navbar-lightblue bg-white border-bottom box-shadow">
                    <div class="container-fluid">
                        <a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">FinanceChecker</a>
                        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
                                aria-expanded="false" aria-label="Toggle navigation">
                            <span class="navbar-toggler-icon"></span>
                        </button>
                     

                        <div class="navbar-collapse collapse">
                            <ul class="navbar-nav flex-grow-1 justify-content-between">

                                <li class="nav-item">
                                    <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index"><i class="bi bi-house-fill"></i> Home</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link text-dark" asp-area="" asp-controller="Help" asp-action="Index"><i class="bi bi-info-circle-fill"></i> Help</a>
                                </li>
                            </ul>
                            <partial name="_LoginPartial" />
                        </div>
                    </div>
                </nav>
                <hr />
                @if (SignInManager.IsSignedIn(User))
                {
                    <nav class="navbar navbar-expand navbar-light bg-primary rounded-5 shadow-sm">
                        <div class="container-fluid">
                            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
                                    aria-expanded="false" aria-label="Toggle navigation">
                                <span class="navbar-toggler-icon"></span>
                            </button>
                            <div class="navbar-collapse collapse">
                                <ul class="nav nav-pills nav-fill gap-2 p-1 small" id="pillNav2" role="tablist" style="--bs-nav-link-color: var(--bs-white); --bs-nav-pills-link-active-color: var(--bs-primary); --bs-nav-pills-link-active-bg: var(--bs-white);">
                                    <li class="nav-item" role="presentation" id="dashboard-tab">
                                        <a class="nav-link rounded-5" href="/Dashboard/Index"><i class="bi bi-view-list"></i> Dashboard</a>
                                    </li>
                                    <li class="nav-item" role="presentation" id="account-tab">
                                        <a class="nav-link rounded-5" href="/Account/Index"><i class="bi bi-bank"></i> Accounts</a>
                                    </li>
                                    <li class="nav-item" role="presentation" id="transaction-tab">
                                        <a class="nav-link rounded-5" href="/Transaction/Transaction"><i class="bi bi-cash-stack"></i> Transactions</a>
                                    </li>
                                    <li class="nav-item" role="presentation" id="budget-tab">
                                        <a class="nav-link rounded-5" href="/Budget/Index"><i class="bi bi-wallet-fill"></i> Budget</a>
                                    </li>
                                    <li class="nav-item" role="presentation" id="expense-tab">
                                        <a class="nav-link rounded-5" href="/Expense/Index"><i class="bi bi-bag-check-fill"></i> Expense</a>
                                    </li>
                                    <li class="nav-item" role="presentation" id="savings-tab">
                                        <a class="nav-link rounded-5" href="/Savings/Index"><i class="bi bi-save-fill"></i> Savings</a>
                                    </li>
                                    <li class="nav-item" role="presentation" id="bills-tab">
                                        <a class="nav-link rounded-5" href="/Bills/Index"><i class="bi bi-receipt"></i> Bills</a>
                                    </li>
                                    <li class="nav-item" role="presentation" id="alerts-tab">
                                        <a class="nav-link rounded-5" href="/Alert/Index"><i class="bi bi-bell-fill"></i> Alerts</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </nav>

                }
            </div>

        </header>
        <div class="container">
            <main role="main" class="pb-3" style="margin-bottom: 50px;">
                <partial name="_Notification" />
                @RenderBody()
            </main>
        </div>

        <footer class="border-top footer text-muted" style="background-color: #007bff;">
            <div class="container text-center" style="color: white;">
                &copy; 2023 - FinanceChecker. All rights reserved. - <a asp-area="" asp-controller="Home" asp-action="Privacy" style="color: white;">Privacy</a>
            </div>
        </footer>


        <script src="~/lib/jquery/dist/jquery.min.js"></script>
        <script src="~/lib/jquery/dist/jquery_create_account.js"></script>
        <script src="~/lib/jquery/dist/transaction.js"></script>
        <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
        <script src="https://cdn.datatables.net/1.11.1/js/jquery.dataTables.min.js"></script>
        <script src="https://cdn.datatables.net/responsive/2.2.9/js/dataTables.responsive.min.js"></script>
        <script src="~/js/site.js" asp-append-version="true"></script>

        @await RenderSectionAsync("Scripts", required: false)
    </body>
</html>